package springTaskScheduler.example;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author CKC
 * @DateTime 2021/12/12 18:21
 */
@Component
public class SchedulerExample {

    @Scheduled(cron = "*/1 * * * * *")
    public void printf() {
        List<char[]> list = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            list.add(new char[512 * 1024 * 10]); //10MB
        }
        System.out.println(Thread.currentThread().getName() + "\t123");
    }
}
